<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div{
            display: flex;
            /* 横向换行 */
            flex-direction: row;
            flex-wrap: wrap;
            /* 等价 简写  */
             flex-flow: row wrap;

            /* 竖轴换行 */
           /* flex-direction: column;
           flex-wrap: wrap; */
           /* 等价 简写 */
           /* flex-flow: column wrap; */

            width: 60%;
            height: 300px;
            background-color: pink;
        }
        .div div{
            width: 200px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
  <div class="div">
    <div>1</div>
    <div>2</div>
    <div>3</div>
  </div>  
</body>
</html>